import React from 'react'
import {ITEMTYPE} from "../types/store"
import { useNavigate } from "react-router-dom"
import { Grid, Image ,Swiper,Search ,Sticky  } from 'react-vant';
interface DATATYPE{
    dataScrop:ITEMTYPE
}
export default function Item(props:DATATYPE) {
    const navigate=useNavigate()
    const {id,img,title,price,num} =props.dataScrop
  return (
    <div onClick={()=>{navigate("/address",{state:props.dataScrop})}}>
         <Image src={img} />
          <p>{title}</p>
    </div>
  )
}
